All files / src/app/user layout.tsx

0% Statements 0/8
0% Branches 0/2
0% Functions 0/1
0% Lines 0/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                                                                 
'use client';
 
import React from 'react';
import { usePathname } from 'next/navigation';
import ModernUserSidebar from '@/components/user/ModernUserSidebar';
import TMDBAttribution from '@/components/common/TMDBAttribution';
 
export default function UserLayout({
  children}: {
  children: React.ReactNode;
}) {
  const pathname = usePathname();
  const isWatchPage = pathname.includes('/watch');
 
  // Minimal layout for watch page
  if (isWatchPage) {
    return <div className="min-h-screen bg-black text-white">{children}</div>;
  }
 
  return (
    <div className="relative min-h-screen bg-[#050505] text-white overflow-x-hidden">
      {/* Fixed Sidebar */}
      <ModernUserSidebar />
 
      {/* Main Content Wrapper */}
      <div className="md:pl-72 min-h-screen transition-all duration-300 w-full">
        {children}
        <TMDBAttribution className="px-6 pb-8 pt-6 text-slate-400/80" />
      </div>
    </div>
  );
}